package com.alibaba.csp.sentinel.dashboard;

import com.alibaba.csp.sentinel.init.InitExecutor;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * 访问地址:http://localhost:5001/sentinel  默认账号/密码：sentinel/sentinel
 * @author cpms
 */
@SpringBootApplication
public class DashboardApplication {

    public static void main(String[] args) {
        triggerSentinelInit();
        SpringApplication.run(DashboardApplication.class, args);
        System.out.println(" __    ___   _      ___   _     ____ _____  ____ ");
        System.out.println("/ /`  / / \\ | |\\/| | |_) | |   | |_   | |  | |_  ");
        System.out.println("\\_\\_, \\_\\_/ |_|  | |_|   |_|__ |_|__  |_|  |_|__ ");
        System.out.println("                                                      ");
        System.out.println("(♥◠‿◠)ﾉﾞ  访问地址:http://localhost:5001/sentinel  默认账号/密码：sentinel/sentinel   ლ(´ڡ`ლ)ﾞ");
    }

    private static void triggerSentinelInit() {
        new Thread(() -> InitExecutor.doInit()).start();
    }
}
